<?php

// +----------------------------------------------------------------------
// |Author: 翼小菜
// +----------------------------------------------------------------------
// |Description: 资源API控制器
// +----------------------------------------------------------------------
// |更多功能可联系QQ314688769
// +----------------------------------------------------------------------
namespace api\cveadmin\controller;
use cmf\controller\RestAdminBaseController;
use api\cveadmin\service\AssetService;
class AssetController extends RestAdminBaseController
{
    /** 
     * @description: 获取相关资源
     * all 全部
     * video 视频
     * image 图片
     * audio 音频
     * files 附件
     * @return array
     */    
    public function getAssets()
    {
        $param = $this->request->param();
        $assetService = new AssetService;
        $data = $assetService->getAssetsByType($param);
        $this->success('success',$data);
    }
}
